#include <stdio.h>

int main(void) {
    int n;
    while (scanf("%d", &n) != 1) {
        while (getchar() != '\n');
    }

    int score;
    int countA = 0, countB = 0, countC = 0, countD = 0, countE = 0;
    char ch;

    for (int i = 0; i < n; ) {
        int ret = scanf("%d", &score);
        if (ret == 0) {
            printf("输入错误：请输入整数！请重新输入！\n");
            while (getchar() != '\n');
            continue;
        }
        if (score < 0 || score > 100) {
            printf("输入错误：请输入0-100的整数！请重新输入！\n");
            while (getchar() != '\n');
            continue;
        }
        ch = getchar();
        if (ch != '\n') {
            printf("输入错误：检测到非数字字符！请重新输入！\n");
            while (getchar() != '\n');
            continue;
        }
        if (score >= 90)       countA++;
        else if (score >= 80)  countB++;
        else if (score >= 70)  countC++;
        else if (score >= 60)  countD++;
        else                   countE++;

        i++;
    }

    printf("等级A：%d\n", countA);
    printf("等级B：%d\n", countB);
    printf("等级C：%d\n", countC);
    printf("等级D：%d\n", countD);
    printf("等级E：%d\n", countE);

    return 0;
}
